package com.jfinal.j2cache.impl.j2cache;

import com.jfinal.j2cache.CacheManager;
import com.jfinal.j2cache.plugin.j2cache.J2CacheKit;

public class J2CacheManager implements CacheManager {
    @Override
    public <T> T get(String cacheName, String key) {
        return J2CacheKit.get(cacheName, key);
    }

    @Override
    public void put(String cacheName, String key, Object value) {
        J2CacheKit.put(cacheName, key, value);
    }

    @Override
    public void evict(String cacheName, String key) {
        J2CacheKit.remove(cacheName, key);
    }

    @Override
    public void clear(String cacheName) {
        J2CacheKit.removeAll(cacheName);
    }
}
